<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<probiz:pageHeading pageHeadingKey="contentList.heading" />
<%@ taglib prefix="content" tagdir="/WEB-INF/tags/content"%>
<%@ taglib prefix="system" tagdir="/WEB-INF/tags/system"%>

<form class="mainForm" id="contentListForm" name="contentListForm" method="post" action="${ctxPath}/content/content.html">
	<c:set var="editURLPath" value="/content/content.html?doAction=edit&from=list" scope="page" />
	<div class="top clearfix">
		<ul class="tab">
			<li class="curr"><span><fmt:message key="menu.contentList"/></span></li>
		</ul>
		<%@include file="/common/pagingOnlyTop.jsp"%>
	</div>
	<div class="data">
		<c:set var="checkAll"><input type="checkbox" name="allbox" onclick="checkAll(this.form)" class="checkbox"/></c:set>
		<c:set var="isNeedTopPaging" value="true"/>
		
		<table id="content" width="100%" border="0" cellspacing="0" cellpadding="0" class="list_table" >	
			<tr>
			  	<th width="20"><input onclick="checkAll(this.form)" name="allbox" type="checkbox" value="" /></th>	
			  	<th style="width: 10%"><fmt:message key="content.imageUrl"/></th>	
				<th style="width: 20%" class='sortable ${(contentSearchCriteria.orderby eq 3)?"sorted order1":((contentSearchCriteria.orderby eq 4)?"sorted order2":"")}'>	
					<a onclick="sortField(this,3,4)"><fmt:message key="content.contentTitle" /></a>
				</th>
			  	<th><fmt:message key="tags.name"/></th>	
			  	<th style="width: 20%" class='sortable ${(contentSearchCriteria.orderby eq 5)?"sorted order1":((contentSearchCriteria.orderby eq 6)?"sorted order2":"")}'>	
			  		<a onclick="sortField(this,5,6)"><fmt:message key="content.category"/></a>
			  	</th>	
			  	<th style="width: 10%" class='sortable ${(contentSearchCriteria.orderby eq 7)?"sorted order1":((contentSearchCriteria.orderby eq 8)?"sorted order2":"")}'>	
			  		<a onclick="sortField(this,7,8)"><fmt:message key="content.updateTimeWhen"/></a>
			  	</th>
			  	<th style="width: 7%" class='sortable ${(contentSearchCriteria.orderby eq 9)?"sorted order1":((contentSearchCriteria.orderby eq 10)?"sorted order2":"")}'>	
			  		<a onclick="sortField(this,9,10)"><fmt:message key="content.status"/></a>
			  	</th>	
			</tr>
			<c:forEach var="content" items="${contentList}" varStatus="status">
				<tr  class="${(status.index%2==0)?'even':'odd'}">
					<td>
						<common:htmlEscape value="${content.tagNames}" returnValue="tagNames"/>
						<input type="checkbox" tags="${tagNames}" name="multiIds" value="${content.contentId}" class="checkbox" title="${content.contentName}" id="multiIds_${content.contentId}"/>
					</td>
					<td>
						<a href="javascript:void(0)" onclick="editContent(${content.contentId})">
	        				<content:contentImage content="${content}" sizeType="s0" linkType="0" width="58" height="58"/>
						</a>	
					</td>
					<td>
						<b><a href="javascript:void(0)"		onclick="editContent(${content.contentId})">${content.contentTitle}</a></b>
					</td>
					<td>
						<c:forEach items="${content.tagNameArray}" var="tagName">
							<b title="${tagName}" class="tag"><common:displayString value="${tagName}" length="5"/></b>
						</c:forEach>
					</td>
					<td>
						${content.category.simpleCategoryPathName}
					</td>
					<td>
						<common:whenInfo time="${content.updateTime}"/>
					</td>
					<td>
						<fmt:message key="content.status.${content.status}"/>
					</td>
			</c:forEach>	
			<c:if test="${empty contentList}">
				<tr>
					<td colspan="7" style="text-align:center">
						<fmt:message key="contentList.empty"/>
					</td>
				</tr>
			</c:if>
		</table>	
		<%@include file="/common/pagingOnly.jsp"%>
	</div>
</form>
<%--start:保存查询条件 --%>
<%@include file="contentSearchCriteriaStorage.jspf"%> 
<%--end:保存查询条件 --%>
<script type="text/javascript">
highlightTableRows("content");
</script>